package cn.wolfcode.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;
import java.util.HashMap;

@Setter@Getter@ToString
public class CourseOrder {
    private Long id;

    private Date inputTime;

    private Customer customer;

    private SystemDictionaryItem course;

    private Integer money;

    public String getJson(){
        HashMap<Object,Object> map = new HashMap<>();
        map.put("id",id);
        map.put("customerId",customer.getId());
        map.put("courseId",course.getId());
        map.put("money",money);
        return JSON.toJSONString(map);
    }
}